file(GLOB_RECURSE motor_server_srcs src/motor_server/*.c)
file(GLOB_RECURSE tmc2209_srcs src/tmc2209/*.c)
file(GLOB_RECURSE key_srcs src/key/*.c)
file(GLOB_RECURSE adc_srcs src/adc/*.c)
file(GLOB_RECURSE led_srcs src/led/*.c)
file(GLOB_RECURSE strg_srcs src/storage/*.c)


set(include_dirs "."
         "src/motor_server"
         "src/tmc2209"
         "src/key"
         "src/adc"
         "src/led"
         "src/storage")

set(srcs "stepmotor.c"
        "${motor_server_srcs}"
        "${tmc2209_srcs}"
        "${key_srcs}"
        "${adc_srcs}"
        "${led_srcs}"
        "${strg_srcs}")

idf_component_register(SRCS "${srcs}"
                    INCLUDE_DIRS "${include_dirs}"
                    EMBED_FILES index_html.html)
